class AuthMiddleware {
    constructor() {
        this.middleware = this.middleware.bind(this);
    }

    middleware(req, res, next) {
        const token = req.headers["authorization"];
        if (token) {
            next();
        } else {
            res.status(401).json({ message: "Unauthorized" });
        }
    }
}

module.exports = AuthMiddleware;
